package com.itheima.Demo03;

public class Demo同步方法解决 {
    public static void main(String[] args) {
        //创建子类对象;
        AAA ab = new AAA();
        //创建thread对象;
        Thread mt = new Thread(ab);
        //调用set方法改名;
        mt.setName("窗口一");
        mt.start();
        //再创建一个Tread对象;
        Thread mt2 = new Thread(ab);
        mt2.setName("窗口二");
        mt2.start();
    }
}
